# version 0.0.2
import random

filename = 'abx'
with open(filename, 'a', encoding='utf-8') as file_obj:
    while (1):
        try:
            rand_number = str(random.uniform(1, 10))
            # 由于上版本程序写速度有瓶颈, 远远不及HDD写入极限
            # 故一次性写入更长的字段, 以多次相同的模式写入
            file_obj.write(rand_number + rand_number +
                           rand_number + rand_number)
        except Exception as e:
            print(e)
            break
